'\" te
.\"  Copyright 1989 AT&T
.\" Copyright (C) 2006, Sun Microsystems, Inc.
.\" All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LINKB 9F "Jan 16, 2006"
.SH NAME
linkb \- concatenate two message blocks
.SH SYNOPSIS
.LP
.nf
#include <sys/stream.h>



\fBvoid\fR \fBlinkb\fR(\fBmblk_t *\fR\fImp1\fR, \fBmblk_t *\fR\fImp2\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Architecture independent level 1 (DDI/DKI).
.SH DESCRIPTION
.sp
.LP
The \fBlinkb()\fR function creates a new message by adding \fImp2\fR to the
tail of \fImp1\fR. The continuation pointer, \fBb_cont\fR, of \fImp1\fR is set
to point to \fImp2\fR.
.sp
.LP
The following figure describes how the \fBlinkb(m1, m2);\fR function
concatenates two message blocks, \fBmp1\fR and \fBmp2\fR:
.sp
Printed copy or docs.sun.com shows a figure that describes how the linkb(m1,
m2); function creates a new message by adding mp1 to the tail of mp2
.SH PARAMETERS
.sp
.ne 2
.na
\fB\fImp1\fR\fR
.ad
.RS 7n
The message to which \fImp2\fR is to be added. \fBmblk_t\fR is an instance of
the \fBmsgb\fR(9S) structure.
.RE

.sp
.ne 2
.na
\fB\fImp2\fR\fR
.ad
.RS 7n
The message to be added.
.RE

.SH CONTEXT
.sp
.LP
The \fBlinkb()\fR function can be called from user, interrupt, or kernel
context.
.SH EXAMPLES
.sp
.LP
See \fBdupb\fR(9F) for an example that uses \fBlinkb()\fR.
.SH SEE ALSO
.sp
.LP
.BR dupb (9F),
.BR unlinkb (9F),
.BR msgb (9S)
.sp
.LP
\fIWriting Device Drivers\fR
.sp
.LP
\fISTREAMS Programming Guide\fR\fI\fR
